package f_properties;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;
import java.util.Set;

/**
 * @author Cheng-02
 * @version V1.0
 * @Package f_properties
 * @date 2024/4/14 下午1:57
 */
public class Test01 {
    public static void main(String[] args) {
      Properties properties = new Properties();
        try {
            FileInputStream fileInputStream = new FileInputStream("module11\\jdbc.properties");
            properties.load(fileInputStream);
            Set<String> strings = properties.stringPropertyNames();
            for (String string : strings) {
                System.out.println(string + ":" + properties.getProperty(string));

            }
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
